#!/usr/bin/perl

# Define a filename
my $file = $ARGV[0];

# Check if the file is readable/writable/executable
if (-r $file and -w $file and -x $file) {
    print "$file is readable/writable/executable\n";
} else {
    print "$file is not readable/writable/executable\n";
}

# Check if the file exists
if (-e $file) {
    print "$file exists\n";
} else {
    print "$file does not exist\n";
}

# Check the size of the file
my $size = -s $file;
print "The size of $file is $size\n";

# Check if the file is a text file
if (-T $file) {
    print "$file is a text file\n";
} else {
    print "$file is not a text file\n";
}

# Check if the file is a binary file
if (-B $file) {
    print "$file is a binary file\n";
} else {
    print "$file is not a binary file\n";
}

# Check how much time has passed since the last modification of the file
my $time = -M $file;
print "It has been $time days since $file was last modified\n";

